{%include file="header.html"%}
<style>
textarea {	width: 350px;	height: 100px;}
tr {height: 48px; }
th {background-color:#f3f3f3; font-size:18px;}
td {font-size:12px;}
</style>
<body>
<div class="fixed-bar">
  <div class="item-title">
    <h3>发货单操作：查看</h3>
  </div> 
</div>
<div class="fixed_bottom">
	<div class="list-div" style="margin-bottom: 5px">
   <form method="post" action="order.php" enctype="multipart/form-data" id="aspnetForm" name="form1">
	  <table width="100%" cellpadding="3" cellspacing="1">
  		<tr>
    		<th colspan="4">基本设置</th>
  		</tr>
  		<tr>
    	   <td><div align="right"><strong>发货单流水号：</strong></div></td>
    	   <td>{%$back_order.delivery_sn%}</td>
    	   <td><div align="right"><strong>发货时间：</strong></div></td>
    	   <td>{%$back_order.update_time|date_format:'%Y-%m-%d %H:%M:%I'%}</td>
  		</tr>
  		<tr>
    	   <td width="18%"><div align="right"><strong>订单号：</strong></div></td>
   		   <td width="34%">{%$back_order.order_sn%}</td>
    	   <td><div align="right"><strong>下单时间：</strong></div></td>
    	   <td>{%$back_order.add_time|date_format:'%Y-%m-%d %H:%M:%I'%}</td>
  		</tr>
  		<tr>
    	   <td><div align="right"><strong>购货人：</strong></div></td>
    	   <td>{%$back_order.user_name|default:$lang.anonymous%}</td>
    	   <td><div align="right"><strong>缺货处理：</strong></div></td>
    	   <td>{%$back_order.how_oos%}</td>
  		</tr>
  		<tr>
    	   <td><div align="right"><strong>配送方式：</strong></div></td>
    	   <td>{%$back_order.shipping_name%}</td>
    	   <td><div align="right"><strong>配送费用：</strong></div></td>
    	   <td>{%$back_order.shipping_fee%}</td>
  		</tr>
  		<tr>
    	   <td><div align="right"><strong>是否保价：</strong></div></td>
    	   <td>{%if $back_order.insure_yn==1%}否{%else%}是{%/if%}</td>
    	   <td><div align="right"><strong>保价费用：</strong></div></td>
    	   <td>{%$back_order.insure_fee|default:0.00%}</td>
  		</tr>
      <tr>
          <td><div align="right"><strong>发货单号：</strong></div></td>
          <td><input type="text" name="invoice_no" value="{%$back_order.invoice_no%}" style=" width:180px; height:24px;"></td>
      </tr>
  		<tr>
          <th colspan="4">收货人信息</th>
    	</tr>
  		<tr>
    	   <td><div align="right"><strong>收货人：</strong></div></td>
    	   <td>{%$back_order.consignee|escape%}</td>
    	   <td><div align="right"><strong>电子邮件：</strong></div></td>
    	   <td>{%$back_order.email%}</td>
  		</tr>
  		<tr>
    	   <td><div align="right"><strong>地址：</strong></div></td>
    	   <td>{%$back_order.region%}{%$back_order.address|escape%}</td>
    	   <td><div align="right"><strong>邮编：</strong></div></td>
    	   <td>{%$back_order.zipcode|escape%}</td>
  		</tr>
  		<tr>
    	   <td><div align="right"><strong>电话：</strong></div></td>
    	   <td>{%$back_order.tel%}</td>
    	   <td><div align="right"><strong>手机：</strong></div></td>
    	   <td>{%$back_order.mobile|escape%}</td>
  		</tr>
  		<tr>
    	   <td><div align="right"><strong>标志性建筑：</strong></div></td>
    	   <td>{%$back_order.sign_building|escape%}</td>
    	   <td><div align="right"><strong>最佳送货时间：</strong></div></td>
    	   <td>{%$back_order.best_time|escape%}</td>
  		</tr>
  		<tr>
    	   <td><div align="right"><strong>客户给商家的留言：</strong></div></td>
    	   <td colspan="3">{%$back_order.postscript%}</td>
  		</tr>
	 </table>
  </div>
  <div class="list-div" style="margin-bottom: 5px">
    <table width="100%" cellpadding="3" cellspacing="1">
      <tr>
        <th colspan="7" scope="col">商品信息</th>
      </tr>
     <tr>
        <td scope="col"><div align="center"><strong>商品名称</strong></div></td>
        <td scope="col"><div align="center"><strong>货号</strong></div></td>
        <td scope="col"><div align="center"><strong>货品号</strong></div></td>
        <td scope="col"><div align="center"><strong>属性</strong></div></td>
        <td scope="col"><div align="center"><strong>发货数量</strong></div></td>
      </tr>
 	    {%foreach from=$goods_lsit item=goods key=k%}
      <tr>
        <td><div style="text-align:center">{%$goods.goods_name%}</div></td>
        <td><div style="text-align:center">{%$goods.goods_sn%}</div></td>
        <td><div style="text-align:center">{%$goods.product_sn%}</div></td>
        <td><div style="text-align:center">{%$goods.goods_attr%}</div></td>
        <td><div style="text-align:center">{%$goods.send_number%}</div></td>
      </tr>
      {%/foreach%}
    </table>
  </div>
  <div class="list-div" style="margin-bottom: 5px">
    <table  width="100%"cellpadding="3" cellspacing="1">
    {%if $back_order.status==1%}{%else%}
      <tr>
        <th colspan="6">操作信息</th>
      </tr>
      <tr>
        <td><div align="right"><strong>操作者：</strong></div></td>
        <td>{%$back_order.action_user%}</td>
        <td><div><strong>办事处：</strong></div></td>
        <td>{%$back_order.agency_name%}</td>
      </tr>
      <tr>
        <td><div align="right" >操作备注：  &nbsp;&nbsp;&nbsp;&nbsp; </div></td>
        <td colspan="5">
        <textarea name="action_note" cols="192" rows="3"></textarea>
        </td>
        <td></td>
        <td></td>
      </tr>
   
      <tr>
        <td><div align="right"><strong>当前可执行操作：</strong></div></td>
        <td>
          {%if $back_order.status==2%}
            <input type="submit" value='发货' style=" width:60px;">
            <input type="hidden" name='act' value='deliver'>
            <input type="hidden" name='order_id' value='{%$back_order.order_id%}'>
            <input type="hidden" name='delivery_id' value='{%$back_order.delivery_id%}'>
            <input type="hidden" name='good' value='1'>
            {%else $back_order.status==3%}
            <input type="submit" value='取消发货'>
            <input type="hidden" name='act' value='deliver'>
            <input type="hidden" name='delivery_id' value='{%$back_order.delivery_id%}'>
            <input type="hidden" name='order_id' value='{%$back_order.order_id%}'>
            <input type="hidden" name='good' value='2'>
          {%/if%}
        </td>
      </tr>
    </form>
    {%/if%}
  </table>
</div>
<div>
  <table align="center;" class="table tb-type2">
    <thead>
      <tr>
        <th><a>操作者</a></th>
        <th><a>操作时间</a></th>
        <th><a>订单状态</a></th>
        <th><a>付款状态</a></th>
        <th><a>发货状态</a></th>
      </tr>
      {%foreach from=$order_log item=list key=k%}
        <tr>
          <td align="center">{%$list.action_user%}</td>
          <td align="center">{%$list.log_time|date_format:'%Y-%m-%d %H:%M:%I'%}</td>
          <td align="center">
          {%if $list.order_status==0%}未确认
          {%elseif $list.order_status==1 %}已确认
          {%elseif $list.order_status==2 %}<font color="#FF0000">取消</font>
          {%elseif $list.order_status==3 %}<font color="#FF0000">无效</font>
          {%elseif $list.order_status==4 %}<font color="#FF0000">退货</font>
          {%elseif $list.order_status==5 %}已分单
          {%elseif $list.order_status==6 %}部分已分单
          {%/if%}
          </td>
          <td align="center">{%if $list.pay_status==0%}未付款
          {%elseif $list.pay_status==1%}付款中
          {%elseif $list.pay_status==2%}已付款
          {%/if%}
          </td>
          <td align="center">{%if $list.shipping_status==0%}未发货
          {%elseif $list.shipping_status==1%}已发货
          {%elseif $list.shipping_status==2%}收货确认
          {%elseif $list.shipping_status==3%}配货中
          {%elseif $list.shipping_status==4%}已发货(部分商品)
          {%elseif $list.shipping_status==5%}发货中(前台状态：未发货)
          {%/if%}
          </td>
        </tr>
      {%/foreach%}
    </thead>
  </table>
</div>